package com.designpattern.creatorpattern.factorypattern.simple;

/**
 * @author Administration
 * @date 2021/10/13 - 11:01 - 星期三
 * @project lambda
 * @package com.designpattern.factorypattern.simple
 * @by 晨
 */
public class SimpleCoffeeFactory {
    public Coffee createCoffee(String type) {
        Coffee coffee = null;
        if("americano".equals(type)) {
            coffee = new AmericanCoffee();
        } else if("latte".equals(type)) {
            coffee = new LatteCoffee();
        }
        return coffee;
    }
}
